home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / internet / net commander 1.0 / ISP / SCRPTLST / CAMORG.CMD < prev    next >
Encoding:
Text File  |  1996-02-12  |  1.1 KB  |  65 lines

  1. # Trumpet Winsock Script for Communications Accessibles Montreal
  2. #
  3. #trace on
  4. #
  5. # set up some strings for dialling up
  6. #
  7. if ![load $number]
  8.   if [query $number "Enter your dial up phone number"]
  9.     save $number
  10.   end
  11. end
  12.  
  13. # number of dial attempts
  14. %attempts = 10
  15. #
  16. #
  17. #----------------------------------------------------------
  18. #
  19. # initialize modem
  20. #
  21. output atz\13
  22. if ! [input 10 OK\n]
  23.   display "Modem is not responding"\n
  24.   abort
  25. end
  26. #
  27. # setup our modem commands
  28. #
  29. output atm1\13
  30. # [substitude atm0 to silence the modem during dialling]
  31. input 10 OK\n
  32. #
  33. # send phone number
  34. #
  35. %n = 0
  36. %ok = 0
  37. repeat
  38.   if %n = %attempts
  39.     display "Too many dial attempts"\n
  40.     abort
  41.   end
  42.   output \13
  43.   sleep 1
  44.   output "atdt"$number\13
  45.   if ! [input 10 BUSY]
  46.     %ok = [input 60 CONNECT]
  47.   end
  48.   %n = %n + 1
  49. until %ok
  50. input 10 \n
  51. #
  52. #  wait till it's safe to send because some modem's hang up
  53. #  if you transmit during the connection phase
  54. #
  55. wait 30 dcd
  56. #
  57. # now prod the terminal server
  58. #
  59. output \13
  60. #
  61. #  wait for the username prompt
  62. #
  63. input 30 login:
  64. #
  65. # we are now connected, and waiting for PAP authentification.